/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hxg.portmgr.core.dao;

import hxg.portmgr.core.device.Device;
import hxg.portmgr.core.device.DeviceModel;
import hxg.portmgr.core.device.DeviceType;
import java.util.Collection;
import java.util.List;

/**
 *
 * @author hxg
 */
public interface DeviceDAO extends DataSource{

    void addDevice(Device dev);

    void removeDevice(Device dev);

    Device getDeviceByIp(String ip);
    
    Device getDeviceById(long devId);

    public void addDevices(Collection<Device> devs);
    
    public void save();
    
    public void load();

    /**
     * 返回一颗 设备类型-设备型号-设备 的树 MAP
     * @return
     */
    //LinkedHashMap<DeviceType, LinkedHashMap<DeviceModel, LinkedHashSet<Device>>> getDeviceTree();
    List<Device> getDevices();

    List<Device> getDevices(DeviceType type);
    
    List<Device> getDevices(DeviceModel model);
}
